package com.qfmrk.service.impl;

import com.qfmrk.entity.User;
import com.qfmrk.mapper.UserMapper;
import com.qfmrk.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * --- 永无霸哥 ---
 *
 * @author M.rk
 * @date 2024/11/13 15:50
 * @desc
 */
@Service
public class UserServiceImpl implements UserService {


    @Autowired
    private UserMapper userMapper;

    @Override
    public User userLogin(User user) {
        User login = userMapper.userLogin(user);

        return login;
    }

    @Override
    public List<User> findUserList(HashMap<String, Object> map) {
        List<User> userList = userMapper.findUserList(map);

        return userList;
    }

    @Override
    public int handleDelete(int id) {
        int i = userMapper.handleDelete(id);

        return i;
    }

    @Override
    public int delBatch(ArrayList<Integer> ids) {
        int i = userMapper.delBatch(ids);

        return i;
    }

    @Override
    public int appendUser(User user) {
        int i = userMapper.appendUser(user);

        return i;
    }

    @Override
    public int updateByUser(User user) {
        int i = userMapper.updateByUser(user);

        return i;
    }
}
